import { request, METHOD } from "@/service/http.service";

export function createInstruction(data) {
    return request({
        url: '/api/gptInstructions',
        method: 'POST',
        data,
    })
}

export function getInstruction(data) {
    return request({
        url: '/api/gptInstructions/detail',
        data,
    })
}

export function updateInstruction(data) {
    return request({
        url: '/api/gptInstructions',
        method: 'POST',
        data,
    })
}


export function deleteTopInstructionList(id) {
  return request({
    url: '/api/gptInstructions/deleteAll',
    method: 'DELETE',
    data: [id]
  })
}

export function getTopInstructionList() {
  return request({
    url: '/api/gptInstructions/randomList',
    method: 'GET',
  })
}

export function getInstructionList(version) {
  return request({
    url: `/api/gptInstructions/list/${version}`,
    method: 'GET',
  })
}